← Back
Editing: gr_abort_query_on_plugin_error.result
include/group_replication.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] ####################### # Start a 2 server group server1 include/start_and_bootstrap_group_replication.inc CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY , b INT); server2 include/start_group_replication.inc ##################################################################### # Restart group replication on server 2 inducing a failure on recovery include/stop_group_replication.inc set session sql_log_bin=0; call mtr.add_suppression("There was an error when connecting to the donor*"); call mtr.add_suppression("For details please check performance_schema.replication_connection_status table and error log messages of Slave I/O for channel group_replication_recovery."); call mtr.add_suppression("Maximum number of retries when*"); call mtr.add_suppression("Fatal error during the Recovery process of Group Replication.*"); call mtr.add_suppression("Transaction cannot be executed while Group Replication is OFFLINE.*"); call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed"); call mtr.add_suppression("The member is leaving a group without being on one"); call mtr.add_suppression("The member is already leaving or joining a group."); call mtr.add_suppression("Error leaving the group"); call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); set session sql_log_bin=1; CHANGE MASTER TO MASTER_USER='dummy_user' FOR CHANNEL 'group_replication_recovery'; SET @debug_save_retries= @@GLOBAL.group_replication_recovery_retry_count; SET GLOBAL group_replication_recovery_retry_count= 1; ########################################################## # Recovery should fail and the server should become ERROR include/start_group_replication.inc ################################################################### # When we try to execute a transaction on the server, it should fail as # the server is running in the super-read-only mode INSERT INTO test.t1 (b) VALUES (1); ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement ########################################## # Solve the issue and re-execute the query include/stop_group_replication.inc CHANGE MASTER TO MASTER_USER='root' FOR CHANNEL 'group_replication_recovery'; include/start_group_replication.inc INSERT INTO test.t1 (b) VALUES (1); include/rpl_sync.inc ####################################################################### # Assert that server1 and server2 have the same data and GTID_EXECUTED. server1 include/assert.inc ['There is a value 1 in table t1 on server1'] server2 include/assert.inc ['There is a value 1 in table t1 on server2'] server1 server2 include/assert.inc ['server1 and server2 GTID_EXECUTED must be equal'] ######### # Cleanup SET @@GLOBAL.group_replication_recovery_retry_count= @debug_save_retries; DROP TABLE test.t1; include/group_replication_end.inc
Save File
Cancel